//
//  BaseViewController.m
//  insyte
//
//  Created by Vu Dang Tuan on 6/18/15.
//  Copyright (c) 2015 Robert. All rights reserved.
//

#import "BaseViewController.h"
#import "Constants.h"
#import "UIColor+InsyteColors.h"


@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    if (self.navigationController != nil) {
        self.navigationController.navigationBar.barTintColor = [UIColor appBackgroundColor];
        self.navigationController.navigationBar.tintColor = [UIColor loginButtonColor];
        self.navigationController.navigationBar.translucent = FALSE;
        // add logo
        if (self.navigationItem != nil) {
            UIImage* logoImage = [UIImage imageNamed:NavigationBarLogo];
            self.navigationItem.titleView = [[UIImageView alloc] initWithImage:logoImage];
        }
    }
    
    if (self.navigationItem != nil) {
        self.navigationItem.hidesBackButton = YES;
    }
    self.view.backgroundColor = [UIColor appBackgroundColor];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
